//
//  BaseViewController.m
//  DolphinMusic
//
//  Created by dllo on 15/3/21.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

-(void)dealloc
{
    [_buttonView release];
    [_naviImageView release];
    [_localButton release];
    [_netButton release];
    [_FMButton release];
    [_searchButton release];
    [_settingButton release];
    [super dealloc];
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIImage *image = [UIImage imageNamed:@"bg2.jpg"];
    image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(1, 1, 1, 1)];
    
    self.naviImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 20, VIEW_WIDTH, 44)];
    self.naviImageView.userInteractionEnabled = YES;
    self.naviImageView.image = image;
    [self.view addSubview:self.naviImageView];
    [_naviImageView release];
    
    
    self.buttonView = [[UIView alloc] init];
    self.buttonView.backgroundColor = [UIColor whiteColor];
    self.buttonView.alpha = 0.3;
    [self.naviImageView addSubview:self.buttonView];
    [_buttonView release];
    
    self.localButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.localButton.frame = CGRectMake(0, 0, 70, 44);
    self.localButton.tintColor = [UIColor whiteColor];
    [self.localButton setTitle:@"本地文件" forState:UIControlStateNormal];
    [self.naviImageView addSubview:self.localButton];
    
    self.netButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.netButton.frame = CGRectMake(70, 0, 80, 44);
    self.netButton.tintColor = [UIColor whiteColor];
    [self.netButton setTitle:@"网络音乐库" forState:UIControlStateNormal];
    [self.naviImageView addSubview:self.netButton];
    
    self.FMButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.FMButton.frame = CGRectMake(150, 0, 60, 44);
    self.FMButton.tintColor = [UIColor whiteColor];
    [self.FMButton setTitle:@"海豚FM" forState:UIControlStateNormal];
    [self.naviImageView addSubview:self.FMButton];
    
    self.searchButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.searchButton.frame = CGRectMake(210, 10, (VIEW_WIDTH - 210) / 2, 44);
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(210 + (self.searchButton.frame.size.width - 25) / 2, 10, 25, 25)];
    imageView.image = [UIImage imageNamed:@"search.png"];
    [self.naviImageView addSubview:imageView];
    [imageView release];
    
    [self.naviImageView addSubview:self.searchButton];
    
    
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, VIEW_WIDTH, 20)];
    view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view];
    [view release];
    
}


- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
